package uicgas.pump.device;

import uicgas.pump.misc.Config;

/**
 * Physical pump interface
 * 
 * @author Hong Wang
 *
 */
public interface PhysicalPump
{
	public enum GasolineGrade
	{
		Regular(Config.GAS_PRICE_REGULAR), Midgrade(Config.GAS_PRICE_MIDGRADE), Premium(
				Config.GAS_PRICE_PREMIUM);

		private double price;

		private GasolineGrade(double price)
		{
			this.price = price;
		}

		public void setPrice(double price)
		{
			this.price = price;
		}

		public double getPrice()
		{
			return price;
		}

	}

	/**
	 * active the physical pump
	 */
	void activePump();

	/**
	 * deactive the physical pump
	 */
	void deactivePump();

	/**
	 * change current pumping gas grade of the physical pump
	 * @param grade gasoline grade
	 */
	void changeGrade(GasolineGrade grade);

	/**
	 * start pumping on the physical pump
	 */
	void startPumping();

	//	void stopPumping();

	/**
	 * finish pumping on the physical pump
	 */
	void finishedPumping();

	double getPumpedDollars();

	double getPumpedGallons();
}
